#ifdef __cplusplus
extern "C" {
#endif

#ifndef PLAYER_H
#define PLAYER_H

enum {
  TYPE_AUDIO,
  TYPE_VIDEO
};

/**
 * \brief 播放器状态机
 */
enum {
    PSTATE_NONE,            // is 0
    PSTATE_INITED,          // is 1, and so on
    PSTATE_STARTED,
    PSTATE_RUNNING_IDLE,
    PSTATE_RUNNING,
    PSTATE_STOPED,
    PSTATE_EXITED
};

extern int pstate; // 播放器状态机
extern int player_init(int type);
extern int player_start(void);
extern int player_pause(void);
extern int player_resume(void);
extern int player_stop(void);
extern int player_exit(void);

#endif // PLAYER_H

#ifdef __cplusplus
}
#endif
